package com.boot;

import com.boot.dao.UsersDao;
import com.boot.entity.UsersInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;


/**
 * Created by Administrator on 2017/2/7.
 */
@Controller
@EnableAutoConfiguration
public class HelloWorldController  extends SpringBootServletInitializer {
    @Autowired
    UsersDao usersDao;

    @RequestMapping("/hello")
    @ResponseBody
    public String index(){
  //   Users users=usersService.getUsersByName("");
        List<UsersInfo> iter=new ArrayList<>();
		 List<UsersInfo> iter2=new ArrayList<>();


        return "hello world" ;



    }

  /*  @RequestMapping("/getName")
    @ResponseBody
    public String getByName(String name) {
        List<Users> usersList = usersDao.findByName(name);
        if (usersList != null && usersList.size()!=0) {
            return "用户共 " + usersList.size()+"个";
        }
        return "没有 " + name + "相关信息";
    }*/
    public static void main(String[] args) {
        SpringApplication.run(HelloWorldController.class, args);
    }



}
